home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / public / SciAn / src / ScianMenuHelpers.h < prev    next >
Text File  |  1994-08-01  |  947b  |  50 lines

  1. ObjPtr storedActions[MAXNMENUHELPERS];
  2.  
  3. void MenuHelper0()
  4. /*Menu helper number 0 for GL menu routines*/
  5. {
  6.     ObjPtr action;
  7.     FuncTyp method;
  8.  
  9.     action = storedActions[0];
  10.     if (!action) return;
  11.     method = GetMethod(action, ACTIONMETHOD);
  12.     if (!method) return;
  13.     (*method)(action);
  14. }
  15.  
  16. void MenuHelper1()
  17. /*Menu helper number 1 for GL menu routines*/
  18. {
  19.     ObjPtr action;
  20.     FuncTyp method;
  21.  
  22.     action = storedActions[1];
  23.     if (!action) return;
  24.     method = GetMethod(action, ACTIONMETHOD);
  25.     if (!method) return;
  26.     (*method)(action);
  27. }
  28.  
  29. void MenuHelper2()
  30. /*Menu helper number 2 for GL menu routines*/
  31. {
  32.     ObjPtr action;
  33.     FuncTyp method;
  34.  
  35.     action = storedActions[2];
  36.     if (!action) return;
  37.     method = GetMethod(action, ACTIONMETHOD);
  38.     if (!method) return;
  39.     (*method)(action);
  40. }
  41.  
  42. typedef void (* HelperTyp)();
  43. HelperTyp menuHelpers[MAXNMENUHELPERS] = 
  44.     {
  45.     MenuHelper0,
  46.     MenuHelper1,
  47.     MenuHelper2
  48.     };
  49.  
  50.